A Declarative Alternative to "Assert" in Logic Programming

نویسندگان

  • Scott Dietzen
  • Frank Pfenning
چکیده

The problem with the standard means by which Prolog programs are extended — assert — is that the construct is not semantically well-behaved. A more elegant alternative (adopted, for example, in λProlog) is implication with its intuitionistic meaning, but the assumptions so added to a logic program are of limited applicability. We propose a new construct rule, which combines the declarative semantics of implication with some of the power of assert. Operationally, rule provides for the extension of the logic program with results that deductively follow from that program. rule, used in conjunction with higher-order programming techniques such as continuationpassing style, allows the natural and declarative formulation of a whole class of logic programs which previously required assert. Example applications include memoization, partial evaluation combined with reflection, resolution, ML type inference, and explanation-based learning.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A note on the Declarative reading(s) of Logic Programming

This paper analyses the declarative readings of logic programming. Logic programming and negation as failure has no unique declarative reading. One common view is that logic programming is a logic for default reasoning, a sub-formalism of default logic or autoepistemic logic. In this view, negation as failure is a modal operator. In an alternative view, a logic program is interpreted as a defin...

متن کامل

Explanation-Based Learning in Logic Programming

It has been argued in the literature that logic programming provides a uniform, expressive, and semantically clean framework for all aspects explanation-based generalization. Previous treatments, however, are inadequate in that they do not work well in difficult problem domains such as theorem proving or formal program development, primarily because meta-programs for such tasks in traditional l...

متن کامل

A Linear-Logic Semantics for Constraint Handling Rules

One of the attractive features of the Constraint Handling Rules (CHR) programming language is its declarative semantics where rules are read as formulae in first-order predicate logic. However, the more CHR is used as a general-purpose programming language, the more the limitations of that kind of declarative semantics in modelling change become apparent. We propose an alternative declarative s...

متن کامل

Declarative Diagnosis of Floundering

Many logic programming languages have delay primitives which allow coroutining. This introduces a class of bug symptoms — computations can flounder when they are intended to succeed or finitely fail. For concurrent logic programs this is normally called deadlock. Similarly, constraint logic programs can fail to invoke certain constraint solvers because variables are insufficiently instantiated ...

متن کامل

Declarative Semantics in Object-Oriented Software Development - A Taxonomy and Survey

One of the modern paradigms to develop an application is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles in applications. In an application, we must distinguish between procedural semantics and declarative semantics for their implementation in a specific programming language. For the procedural semantics, we can write a ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1991